% Script to run the saccade experiment

clear classes

Exp = ET_DS_SACCADE();

% Screen size
%--------------------------------------------------------------------------
% Exp.scn.w = 1680;
% Exp.scn.h = 1050;
% Exp.scn.wcm  = 47.7;
% Exp.scn.hcm = 29.8;
% Exp.scn.dist = 61.0;
% Exp.scn.mon = 0;


Exp.scn.w = 1920;
Exp.scn.h = 1200;
Exp.scn.wcm  = 52;
Exp.scn.hcm = 32;
Exp.scn.mon = 0;
Exp.pt = [1,1;0.01,0.05]';



Exp.fix.w = 0.8;
Exp.fix.h = 0.8;
Exp.fix.shape = 'FillOval';
Exp.fix.eccx = 0;
Exp.fix.eccy = 0;

Exp.target1.w = 0.8;
Exp.target1.h = 0.8;
Exp.target1.ecc = 7.5;

Exp.target2.w = 0.8;
Exp.target2.h = 0.8;
Exp.target2.ecc = 7.5;


% Which blocks are displayed
%--------------------------------------------------------------------------

Exp.prepareBlocks([1]);
Exp.prepareTrials(400)

Exp.bc(1).bg = [100 100 100];
Exp.bc(2).bg = [100 100 100];
Exp.bc(3).bg = [0 78 0];

Exp.bc(1).tc = [0 0 0];
Exp.bc(2).tc = [0 0 0];
Exp.bc(3).tc = [109 0 0];




Exp.text_size = 40;
Exp.scn.refresh_rate = 60.146833;

%Fixation window
Exp.fix_win = 1; 

% 30 trials before recalibrating.
Exp.recal = 30;

% Turn eye link on
%--------------------------------------------------------------------------
Exp.EyeLink = 1;


try 
    Exp.runScreen()
catch Err
    Exp.exit();
    rethrow(Err)
end
    
%Exp.bh_r
